package com.zhoug.common2.utils;

import android.content.Context;
import android.net.Uri;

import androidx.annotation.NonNull;

/**
 * @Author: zhoug
 * @Date: 2024-11-16
 * @Description:
 */
public class ResourceUtils {
    /**
     * 获取res/raw文件夹下文件的Uri
     * @param context 上下文
     * @param fileName 文件名字不含后缀 eg:ring_warning
     * @return
     */
    public static Uri getRawUri(@NonNull Context context, @NonNull String fileName){
        return Uri.parse("android.resource://" + context.getPackageName() + "/raw/"+fileName);
    }
}
